package com.bootdo.app.service;

import java.util.List;
import java.util.Map;

import com.bootdo.app.vo.miniprogram.GroupBuyJoinerVo;
import com.bootdo.app.vo.miniprogram.UserGroupBuyVo;
import com.bootdo.common.utils.Query;
import com.bootdo.system.domain.TbGroupBuying;

/**
 * @auther: Along
 * @description: 用户拼团业务
 */
public interface UserGroupBuyService {


    /**
     * 创建拼团信息
     * @param goodsId
     * @return
     */
    UserGroupBuyVo makeGroupBuy(String goodsId);
    
    List<TbGroupBuying> getListByUser(Integer userId,String month);
    
    TbGroupBuying getByGoodsId(String goodsId);

    /**
     * 加入拼团
     */
    UserGroupBuyVo joinGroupBuy(Integer groupBuyId,String currentUserId);

    /**
     * 取消拼团
     *
     */
    void cancelGroupBuy(Integer groupBuyId);
    
    int yqrNum(Integer groupBuyId);
    
    List<GroupBuyJoinerVo> getYqUser(Integer groupBuyId);
    /**
     * 拼团结束
     *
     */
    void endGroupBuy(String groupBuyId);
    
    boolean statusGroupBuy(String groupBuyId);

	List<TbGroupBuying> list(Map<String, Object> map);

	int count(Map<String, Object> map);
}
